package com.itheima.d3_operator;

/*
    目标：掌握扩展赋值运算符的使用
    基本的赋值运算符 : =
    扩展的赋值运算符 : += -= *= /= %=
 */
public class Test4 {
    public static void main(String[] args) {
        int num = 300;

        num %= 7;
        System.out.println("num = " + num);


        System.out.println("-------------------");

        byte b = 20;
//        b = (byte) (b + 12);
        b += 8;
//        b %= 12;
        System.out.println("b = " + b);

        System.out.println("-------------------");

        byte c = 20;
//        c = (byte) (b + 12);
        c -= 8;
//        c %= 12;
        System.out.println("c = " + c);

        System.out.println("-------------------");

        byte d = 16;
//        b = (byte) (b + 12);
        d *= 8;
//        d %= 12;
        System.out.println("d = " + d);

        System.out.println("-------------------");

        byte e = 20;
//        b = (byte) (b + 12);
        e /= 8;
//        e %= 12;
        System.out.println("e = " + e);

        System.out.println("-------------------");

        byte y = 20;
//        b = (byte) (b + 12);
        y %= 8;
//        e %= 12;
        System.out.println("y = " + y);

    }
}
